//
//  LZFCategoryCell.m
//  LZFBuDieJie
//
//  Created by 梁梓烽 on 16/7/19.
//  Copyright © 2016年 liangzifeng. All rights reserved.
//

#import "LZFCategoryCell.h"
#import "LZFCateoryItem.h"

@interface LZFCategoryCell ()
@property (weak, nonatomic) IBOutlet UIView *redView;

@end
@implementation LZFCategoryCell

- (void)awakeFromNib {
   
    self.textLabel.backgroundColor=[UIColor clearColor];
}

//此方法,可以判断cell的点击和选中
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    self.textLabel.textColor=selected?[UIColor redColor]:[UIColor grayColor];
    
    self.redView.hidden=!selected;
   
}


-(void)setCategoryItem:(LZFCateoryItem *)categoryItem
{
    self.textLabel.text=categoryItem.name;
    
}

@end
